@import (reference) "./variable.less";

.wea-edc-dragging {
  & > .action-btns {
    display: none;
  }
  &.sortable-ghost {
    height: 80px;
    border: 2px dashed #e67575 !important;

    & > * {
      visibility: hidden;
    }
  }
}

/* formview与设计器公共样式 */
.wea-edc-form-item {
  padding: 5px 40px;
  min-height: 32px;
  border: 1px dashed transparent;

  input[type='text'],
  input[type='tel'],
  input[type='email'],
  select,
  textarea, 
  .wea-select,
  .wea-date-picker .ant-input {
    width: 260px;
  }

  .wea-edc-form-name,
  .wea-edc-form-email,
  .wea-edc-form-telephone,
  .wea-edc-form-mobile {
    .ant-input {
      width: 260px;
      padding-left: 24px;
    }
  }

  .ant-input-number {
    width: 260px;
  }

  &.selected {
    background-color: @fi-bgColor; 

    &:hover {
      border-color: transparent;
    }
  }

  &:hover {
    border-color: @fi-border-color;

    &:before {
      display: block;
    }
  }

  &:before {
    content: '';
    position: absolute;
    display: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    opacity: 0.1;
    z-index: 1;
  }

  .required { position: relative}
  
  .action-group {
    position: absolute;
    display: none;
    right: 2px;
    bottom: 1px;
    z-index: 2;

    span {
      padding: 2px 5px;
      display: inline-block;
      vertical-align: top;
      color: #fff;
      cursor: pointer;
      transition: all ease-in-out 225ms;
      margin-right: 2px;

      &:last-child { margin-right: 0}
      &:hover {
        opacity: .8;
      }
    }
    i { padding-right: 2px;}
    .action-drag,
    .action-add { background: #3aa1f1}
    .action-delete { background: #e67575}
    .action-copy { background: #91d874}
    .action-drag { 
      cursor: move;
    }
  }
}

.wea-edc-form-item {
  &:hover {
    .action-group { display: block}
  }
}

.wea-edc-form-item .action-group .action-hidden{
    display: none;
  }


.wea-edc-wrapper-com {
  .wea-date-picker,
  .wea-date-picker .ant-input,
  .wea-edc-form-item input[type='text'],
  .ant-input-number,
  .wea-select {
    width: 100%;
  }
  & > .wea-edc-com-title + div {
    .wea-edc-form-item {
      padding-right: 12px;
    }
    .wea-edc-com-title {
      padding: 10px 0 10px 12px;

      & + div,
      & + label,
      & + span,
      // 地址组件
      & + div + .wea-edc-table-layout {
        padding: 10px 0 20px 12px;
      }
    }
  }

  &:not(.wea-edc-wrapper-com) .wea-edc-has-error .wea-edc-errmsg {
    padding-left: 10px;
    margin-top: -18px;
  }
  .wea-edc-input-conatiner .wea-edc-input-icon {
    left: 16px;
  }
  &.wea-edc-form-tablelayout .wea-edc-input-icon {
    left: 4px;
  }
}
.wea-edc-fv-body{
  padding: 5px 0;
}